<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>01Vue介绍-04条件与循环 </title>
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<span>APP3---v-if的用法,设置是否显示信息----------------------------------------------------------</span>
<div id="app-3">
  <p v-if="seen">你看到我了</p>
  <button v-on:click="setSeen(true)">设置可见</button>
  <button v-on:click="setSeen(false)">设置不可见</button>
</div>

</body>
</html>
<script type="text/javascript">
	  //app3
	var app3 = new Vue({
	  el: '#app-3',
	  data: {
	    seen: true
	  },
	  methods:{
	  	// methods的用法 参见 App5
	  	setSeen:function(isSeen){
	  		this.seen=isSeen
	  	}
	  }
	});
</script>